package com.yanqu.road.entity.task;

import com.yanqu.road.utils.property.Property;

import java.util.Date;
import java.util.List;

public class TaskInfo {

	private int taskId;// 任务id

	private int type;// 类型

	private int littleType; //小类型

	private int preTaskId;// 上一个任务id

	private int nextTaskId;// 下一个任务id

	private int integral;// 积分

	private Property reward;// 奖励

	private List<Property> rewardList;// 奖励列表

	private Date beginTime;// 开始时间

	private Date endTime;// 结束时间

	private String rewardStr;//奖励字符串
	private int sort;

	public int getTaskId() {
		return taskId;
	}

	public void setTaskId(int taskId) {
		this.taskId = taskId;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getLittleType() {
		return littleType;
	}

	public void setLittleType(int littleType) {
		this.littleType = littleType;
	}

	public int getPreTaskId() {
		return preTaskId;
	}

	public void setPreTaskId(int preTaskId) {
		this.preTaskId = preTaskId;
	}

	public int getNextTaskId() {
		return nextTaskId;
	}

	public void setNextTaskId(int nextTaskId) {
		this.nextTaskId = nextTaskId;
	}

	public int getIntegral() {
		return integral;
	}

	public void setIntegral(int integral) {
		this.integral = integral;
	}

	public Property getReward() {
		return reward;
	}

	public void setReward(Property reward) {
		this.reward = reward;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	//获取财神密卷的奖励，根据期数来获取，假如和期数无关就返回原先的獎勵
	public Property getSecretVolumeReward(int no) {
		if(rewardList == null){
			return reward;
		}
		Property noReward = new Property();
		if(rewardList.size() >= no){
			return rewardList.get(no-1);
		}
		return noReward;
	}

	public void setRewardList(List<Property> rewardList) {
		this.rewardList = rewardList;
	}

	public String getRewardStr() {
		return rewardStr;
	}

	public void setRewardStr(String rewardStr) {
		this.rewardStr = rewardStr;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
